<template>
  <div class="follow-up-details">
    <!-- <div class="title">随访问卷</div> -->
    <div class="descriptions">
      <div class="descriptions-item">
        <div class="item-label">患者姓名:</div>
        <div class="item-value">{{ resultForm.name }}</div>
      </div>
      <div class="descriptions-item">
        <div class="item-label">性别:</div>
        <div class="item-value">{{ resultForm.gender }}</div>
      </div>
      <div class="descriptions-item">
        <div class="item-label">年龄:</div>
        <div class="item-value">{{ resultForm.age }}</div>
      </div>
      <div class="descriptions-item">
        <div class="item-label">患者类型:</div>
        <div class="item-value">{{ resultForm.outcome_diagnosis_name }}</div>
      </div>
      <div class="descriptions-item">
        <div class="item-label">发病日期:</div>
        <div class="item-value">{{ resultForm.onset_date }}</div>
      </div>
      <div class="descriptions-item">
        <div class="item-label">出院日期:</div>
        <div class="item-value">{{ resultForm.outcome_date }}</div>
      </div>
      <div class="descriptions-item">
        <div class="item-label">住院ID:</div>
        <div class="item-value">{{ resultForm.inpatientId }}</div>
      </div>
      <div class="descriptions-item">
        <div class="item-label">联系电话:</div>
        <div class="item-value">{{ resultForm.tel }}</div>
      </div>
    </div>
    <div class="action">
      <div class="tag">
        <!-- :class="{ isClick: [0, 4, 5].includes(resultForm.followStatus1) }" -->
        <el-tag
          v-if="resultForm.TaskDataMonth1"
          :type="[0, 4, 5].includes(resultForm.followStatus1) ? 'info' : ''"
          @click="onTagClick('TaskDataMonth1', 'followStatus1')"
          :size="tagMonth == 'TaskDataMonth1' ? 'medium' : 'mini'"
        >
          {{ resultForm.followTitle1 }}
        </el-tag>
        <!-- :class="{ isClick: [0, 4, 5].includes(resultForm.followStatus3) }" -->
        <el-tag
          v-if="resultForm.TaskDataMonth3"
          :type="[0, 4, 5].includes(resultForm.followStatus3) ? 'info' : ''"
          @click="onTagClick('TaskDataMonth3', 'followStatus3')"
          :size="tagMonth == 'TaskDataMonth3' ? 'medium' : 'mini'"
        >
          {{ resultForm.followTitle3 }}
        </el-tag>
        <!-- :class="{ isClick: [0, 4, 5].includes(resultForm.followStatus6) }" -->
        <el-tag
          v-if="resultForm.TaskDataMonth6"
          :type="[0, 4, 5].includes(resultForm.followStatus6) ? 'info' : ''"
          @click="onTagClick('TaskDataMonth6', 'followStatus6')"
          :size="tagMonth == 'TaskDataMonth6' ? 'medium' : 'mini'"
        >
          {{ resultForm.followTitle6 }}
        </el-tag>
        <!-- :class="{ isClick: [0, 4, 5].includes(resultForm.followStatus12) }" -->
        <el-tag
          v-if="resultForm.TaskDataMonth12"
          :type="[0, 4, 5].includes(resultForm.followStatus12) ? 'info' : ''"
          @click="onTagClick('TaskDataMonth12', 'followStatus12')"
          :size="tagMonth == 'TaskDataMonth12' ? 'medium' : 'mini'"
        >
          {{ resultForm.followTitle12 }}
        </el-tag>
        <el-tag
          type=""
          @click="onTagaAfterYearClick(item)"
          v-for="item in resultForm.TaskDataAfterYear"
          :key="item.id"
          :size="taskDataAfterYearId == item.id ? 'medium' : 'mini'"
        >
          {{ item.followTitle }}
        </el-tag>
      </div>
      <el-button type="primary" v-if="getPreFillVisible" @click="onPrefill"
        >使用本人上期问卷数据预填写</el-button
      >
    </div>

    <div class="content">
      <div class="left">
        <div class="left-card" @click="goAnchor('#section1')">基本信息</div>
        <template
          v-if="dataForm.isFollowUp == 1 && dataForm.followUpStatus == 1"
        >
          <div class="left-card" @click="goAnchor('#section2')">危险因素</div>
          <div class="left-card" @click="goAnchor('#section3')">躯体症状</div>
          <div class="left-card" @click="goAnchor('#section4')">检查项目</div>
          <div class="left-card" @click="goAnchor('#section5')">用药情况</div>
        </template>
      </div>
      <div class="right">
        <el-form
          ref="dataForm"
          :model="dataForm"
          :rules="rules"
          :disabled="disabled"
          label-width="140px"
          label-position="left"
        >
          <el-row>
            <el-col :span="24">
              <div class="right-title" id="section1">基本信息</div>
            </el-col>
            <el-col :span="12">
              <el-form-item label="随访科室">
                <el-select
                  style="width: 90%"
                  v-model="dataForm.depId"
                  clearable
                  @change="onChangeDept"
                >
                  <el-option
                    v-for="item in deptList"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                  />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="随访人">
                <el-select
                  style="width: 90%"
                  v-model="dataForm.userId"
                  clearable
                >
                  <el-option
                    v-for="item in userList"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                  />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item label="是否随访" prop="isFollowUp">
                <el-radio-group v-model="dataForm.isFollowUp">
                  <el-radio label="1">已随访</el-radio>
                  <el-radio label="0">未随访</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <template v-if="dataForm.isFollowUp == 1">
              <el-col :span="12">
                <el-form-item label="信息获取途径" prop="way">
                  <el-radio-group v-model="dataForm.way">
                    <el-radio label="1">门诊</el-radio>
                    <el-radio label="2">电话</el-radio>
                    <el-radio label="9">其他</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="实际评估日期" prop="actualEvaluationDate">
                  <el-date-picker
                    style="width: 200px"
                    v-model="dataForm.actualEvaluationDate"
                    type="date"
                    placeholder="选择日期"
                    value-format="yyyy-MM-dd"
                  >
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="24"> </el-col>
              <el-col :span="12">
                <el-form-item label="随访状态" prop="followUpStatus">
                  <el-radio-group v-model="dataForm.followUpStatus">
                    <el-radio label="1">存活</el-radio>
                    <el-radio label="2">死亡</el-radio>
                    <el-radio label="3">失访</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <el-col :span="12" v-if="dataForm.followUpStatus == 2">
                <el-form-item label="死亡日期" prop="deathDate">
                  <el-date-picker
                    style="width: 200px"
                    v-model="dataForm.deathDate"
                    type="date"
                    placeholder="选择日期"
                    value-format="yyyy-MM-dd"
                  >
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="24" v-if="dataForm.followUpStatus == 2">
                <el-form-item label="死亡" prop="deathCause">
                  <el-radio-group v-model="dataForm.deathCause">
                    <el-radio label="1">心血管死亡</el-radio>
                    <el-radio label="2">非心血管死亡</el-radio>
                    <el-radio label="3">不明原因的死亡</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <el-col
                :span="24"
                v-if="dataForm.deathCause == 1 && dataForm.followUpStatus == 2"
              >
                <el-form-item label="心血管死亡" prop="cardiovascularDeath">
                  <el-radio-group v-model="dataForm.cardiovascularDeath">
                    <el-radio label="1">急性心肌梗死</el-radio>
                    <el-radio label="2">心源性猝死</el-radio>
                    <el-radio label="3">心力衰竭</el-radio>
                    <el-radio label="4">卒中</el-radio>
                    <el-radio label="5">心血管手术</el-radio>
                    <el-radio label="6">心血管出血</el-radio>
                    <el-radio label="99">其他心源性原因</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <el-col
                :span="24"
                v-if="
                  dataForm.deathCause == 1 &&
                  dataForm.followUpStatus == 2 &&
                  dataForm.cardiovascularDeath == 99
                "
              >
                <el-form-item label="内容描述" prop="cardiovascularDeathDesc">
                  <el-input
                    type="textarea"
                    placeholder="请输入内容"
                    v-model="dataForm.cardiovascularDeathDesc"
                    maxlength="500"
                    show-word-limit
                  />
                </el-form-item>
              </el-col>
              <el-col
                :span="24"
                v-if="dataForm.deathCause == 2 && dataForm.followUpStatus == 2"
              >
                <el-form-item
                  label="非心血管死亡"
                  prop="nonCardiovascularDeath"
                >
                  <el-radio-group v-model="dataForm.nonCardiovascularDeath">
                    <el-radio label="1">肺脏原因</el-radio>
                    <el-radio label="2">胃肠原因</el-radio>
                    <el-radio label="3">感染性致死（包括败血症）</el-radio>
                    <el-radio label="4">事故/创伤</el-radio>
                    <el-radio label="5">其他非心血管器官衰竭</el-radio>
                    <el-radio label="6">恶性肿瘤</el-radio>
                    <el-radio label="99">其他非心血管原因</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <el-col
                :span="24"
                v-if="dataForm.deathCause == 3 && dataForm.followUpStatus == 2"
              >
                <el-form-item label="不明原因的死亡" prop="unexplainedDeath">
                  <el-input
                    type="textarea"
                    placeholder="请输入内容"
                    v-model="dataForm.unexplainedDeath"
                    maxlength="500"
                    show-word-limit
                  />
                </el-form-item>
              </el-col>
              <template v-if="dataForm.followUpStatus == 1">
                <el-col :span="24" v-if="dataForm.followUpStatus == 1">
                  <el-form-item label="目前状况" prop="currentState">
                    <el-radio-group v-model="dataForm.currentState">
                      <el-radio label="1">正常工作生活</el-radio>
                      <el-radio label="2">日常生活轻度受限</el-radio>
                      <el-radio label="3">日常生活严重受限</el-radio>
                      <el-radio label="4">卧床为主</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="12" v-if="dataForm.followUpStatus == 1">
                  <el-form-item label="加入心脏康复计划" prop="isRecoveryPlan">
                    <el-radio-group v-model="dataForm.isRecoveryPlan">
                      <el-radio label="1">是</el-radio>
                      <el-radio label="0">否</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col
                  :span="12"
                  v-if="
                    dataForm.followUpStatus == 1 && dataForm.isRecoveryPlan == 1
                  "
                >
                  <el-form-item label="开始时间" prop="recoveryPlanDate">
                    <el-date-picker
                      style="width: 200px"
                      v-model="dataForm.recoveryPlanDate"
                      type="date"
                      placeholder="选择日期"
                      value-format="yyyy-MM-dd"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="24" v-if="dataForm.followUpStatus == 1">
                  <el-form-item label="加入心脏关爱计划" prop="isHeartCarePlan">
                    <el-radio-group v-model="dataForm.isHeartCarePlan">
                      <el-radio label="1">是</el-radio>
                      <el-radio label="0">否</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="24" v-if="dataForm.followUpStatus == 1">
                  <el-form-item
                    label="距离上次随访新的主要心血管不良事件"
                    prop="adverseEvents"
                    label-width="264px"
                  >
                    <el-checkbox-group
                      v-model="dataForm.adverseEvents"
                      @change="onAdverseEventsChange"
                    >
                      <el-checkbox label="1">非致死性心肌梗死</el-checkbox>
                      <el-checkbox label="2">缺血性卒中</el-checkbox>
                      <el-checkbox label="3">因心绞痛再次入院</el-checkbox>
                      <el-checkbox label="4">因心力衰竭再次入院</el-checkbox>
                      <el-checkbox label="5">出血</el-checkbox>
                      <el-checkbox label="6">再次血运重建术</el-checkbox>
                      <el-checkbox label="99">无</el-checkbox>
                    </el-checkbox-group>
                  </el-form-item>
                </el-col>
                <el-col :span="24" v-if="dataForm.adverseEvents.includes('6')">
                  <el-form-item label="实施日期" prop="implementDate">
                    <el-date-picker
                      style="width: 200px"
                      v-model="dataForm.implementDate"
                      type="date"
                      placeholder="选择日期"
                      value-format="yyyy-MM-dd"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="24" v-if="dataForm.adverseEvents.includes('5')">
                  <el-form-item label="出血部位" prop="bleedingSite">
                    <el-radio-group v-model="dataForm.bleedingSite">
                      <el-radio label="1">皮肤黏膜</el-radio>
                      <el-radio label="2">消化道</el-radio>
                      <el-radio label="3">泌尿道</el-radio>
                      <el-radio label="4">呼吸道</el-radio>
                      <el-radio label="5">脑出血</el-radio>
                      <el-radio label="6">其他</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>

                <el-col :span="24">
                  <div class="right-title" id="section2">危险因素控制</div>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="血压监测" prop="isHypertension">
                    <el-radio-group v-model="dataForm.isHypertension">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是,获得准确数值</el-radio>
                      <el-radio label="2">是,未获得准确数值</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="12" v-if="dataForm.isHypertension == 1">
                  <el-form-item label="血压" prop="hypertensionValue">
                    <el-input
                      style="width: 300px"
                      placeholder="-- / --"
                      v-model="dataForm.hypertensionValue"
                    >
                      <span slot="append">mmHg</span>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12" v-if="dataForm.isHypertension == 2">
                  <el-form-item
                    label="控制是否达标"
                    prop="isHypertensionUptopar"
                  >
                    <el-radio-group v-model="dataForm.isHypertensionUptopar">
                      <el-radio label="1">是</el-radio>
                      <el-radio label="0">否</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="血脂四项" prop="isHyperLipidemia">
                    <el-radio-group v-model="dataForm.isHyperLipidemia">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是,获得准确数值</el-radio>
                      <el-radio label="2">是,未获得准确数值</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="24" v-if="dataForm.isHyperLipidemia == 1">
                  <el-form-item label="检查时间" prop="bloodfatCheckTime">
                    <el-date-picker
                      style="width: 100%"
                      v-model="dataForm.bloodfatCheckTime"
                      type="date"
                      placeholder="选择日期"
                      value-format="yyyy-MM-dd"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12" v-if="dataForm.isHyperLipidemia == 1">
                  <el-form-item label="TC" prop="bloodfatTcValue">
                    <el-input
                      style="width: 300px"
                      placeholder="请输入内容"
                      v-model="dataForm.bloodfatTcValue"
                    >
                      <span slot="append">mmol/L</span>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12" v-if="dataForm.isHyperLipidemia == 1">
                  <el-form-item label="TG" prop="bloodfatTgValue">
                    <el-input
                      style="width: 300px"
                      placeholder="请输入内容"
                      v-model="dataForm.bloodfatTgValue"
                    >
                      <span slot="append">mmol/L</span>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12" v-if="dataForm.isHyperLipidemia == 1">
                  <el-form-item label="LDL-C" prop="bloodfatLdlcValue">
                    <el-input
                      style="width: 300px"
                      placeholder="请输入内容"
                      v-model="dataForm.bloodfatLdlcValue"
                    >
                      <span slot="append">mmol/L</span>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12" v-if="dataForm.isHyperLipidemia == 1">
                  <el-form-item label="HDL-C" prop="bloodfatHdlcValue">
                    <el-input
                      style="width: 300px"
                      placeholder="请输入内容"
                      v-model="dataForm.bloodfatHdlcValue"
                    >
                      <span slot="append">mmol/L</span>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="脂蛋白a(LPa)" prop="isLpa">
                    <el-radio-group v-model="dataForm.isLpa">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是,获得准确数值</el-radio>
                      <el-radio label="2">是,未获得准确数值</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="12" v-if="dataForm.isLpa == 1">
                  <el-form-item label="数值" prop="bloodfatLpaValue">
                    <el-input
                      style="width: 300px"
                      placeholder="请输入内容"
                      v-model="dataForm.bloodfatLpaValue"
                    >
                      <el-select
                        style="width: 100px"
                        v-model="dataForm.bloodfatLpaUnit"
                        slot="append"
                        placeholder="请选择"
                      >
                        <el-option label="mg/L" :value="1"></el-option>
                        <el-option label="mg/dl" :value="2"></el-option>
                        <el-option label="g/L" :value="3"></el-option>
                        <el-option label="nmol/L" :value="4"></el-option>
                      </el-select>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24"></el-col>
                <el-col :span="12">
                  <el-form-item label="空腹血糖" prop="isDiabetes">
                    <el-radio-group v-model="dataForm.isDiabetes">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是,获得准确数值</el-radio>
                      <el-radio label="2">是,未获得准确数值</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="12" v-if="dataForm.isDiabetes == 2">
                  <el-form-item
                    label="血糖控制在正常范围"
                    prop="isDiabeesNormal"
                  >
                    <el-radio-group v-model="dataForm.isDiabeesNormal">
                      <el-radio label="1">是</el-radio>
                      <el-radio label="0">否</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="24"></el-col>
                <el-col :span="12" v-if="dataForm.isDiabetes == 1">
                  <el-form-item label="检查时间" prop="fbgCheckTime">
                    <el-date-picker
                      style="width: 200px"
                      v-model="dataForm.fbgCheckTime"
                      type="date"
                      placeholder="选择日期"
                      value-format="yyyy-MM-dd"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12" v-if="dataForm.isDiabetes == 1">
                  <el-form-item label="数值" prop="fbgValue">
                    <el-input
                      style="width: 300px"
                      placeholder="请输入内容"
                      v-model="dataForm.fbgValue"
                    >
                      <span slot="append">mmol/L</span>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="糖化血红蛋白" prop="isGhb">
                    <el-radio-group v-model="dataForm.isGhb">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是,获得准确数值</el-radio>
                      <el-radio label="2">是,未获得准确数值</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="12" v-if="dataForm.isGhb == 1">
                  <el-form-item label="检查时间" prop="ghbCheckTime">
                    <el-date-picker
                      style="width: 200px"
                      v-model="dataForm.ghbCheckTime"
                      type="date"
                      placeholder="选择日期"
                      value-format="yyyy-MM-dd"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="12" v-if="dataForm.isGhb == 1">
                  <el-form-item label="数值" prop="ghbValue">
                    <el-input
                      style="width: 300px"
                      placeholder="请输入内容"
                      v-model="dataForm.ghbValue"
                    >
                      <span slot="append">%</span>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="吸烟" prop="isSmoke">
                    <el-radio-group v-model="dataForm.isSmoke">
                      <el-radio label="1">是</el-radio>
                      <el-radio label="0">否</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item
                    label="吸烟"
                    prop="smokeStatus"
                    v-if="dataForm.isSmoke == 1"
                  >
                    <el-radio-group v-model="dataForm.smokeStatus">
                      <el-radio label="1">已戒烟</el-radio>
                      <el-radio label="2">当前仍吸烟</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="饮酒" prop="isDrink">
                    <el-radio-group v-model="dataForm.isDrink">
                      <el-radio label="1">是</el-radio>
                      <el-radio label="0">否</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="身高" prop="height">
                    <el-input
                      style="width: 360px"
                      v-model="dataForm.height"
                      placeholder="请输入身高"
                    >
                      <template slot="append">cm</template>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="体重" prop="weight">
                    <el-input
                      style="width: 360px"
                      v-model="dataForm.weight"
                      placeholder="请输入体重"
                    >
                      <template slot="append">kg</template>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="BMI">
                    <el-input
                      readonly
                      style="width: 360px"
                      v-model="dataForm.bmi"
                      placeholder="根据身高体重自动计算"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <div class="right-title" id="section3">
                    躯体症状与心功能评价
                  </div>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="躯体症状" prop="somaticSymptoms">
                    <el-checkbox-group v-model="dataForm.somaticSymptoms">
                      <el-checkbox label="1">胸痛/胸闷</el-checkbox>
                      <el-checkbox label="2">肌肉酸痛</el-checkbox>
                      <el-checkbox label="3">无明显症状</el-checkbox>
                      <el-checkbox label="9">其他症状</el-checkbox>
                    </el-checkbox-group>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="症状"
                    v-if="dataForm.somaticSymptoms.includes('1')"
                    prop="chestPainSymptom"
                  >
                    <el-radio-group v-model="dataForm.chestPainSymptom">
                      <el-radio label="1">典型心绞痛症状</el-radio>
                      <el-radio label="2">不典型心绞痛症状</el-radio>
                      <el-radio label="3">非特异胸痛</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col
                  :span="24"
                  v-if="dataForm.somaticSymptoms.includes('9')"
                >
                  <el-form-item label="其他症状" prop="somaticSymptomsDesc">
                    <el-input
                      type="textarea"
                      placeholder="请输入内容"
                      v-model="dataForm.somaticSymptomsDesc"
                      maxlength="500"
                      show-word-limit
                    />
                  </el-form-item>
                </el-col>
                <el-col
                  :span="24"
                  v-if="dataForm.somaticSymptoms.includes('1')"
                >
                  <el-form-item
                    label="心绞痛CCS分级"
                    prop="anginapectorisGrade"
                  >
                    <el-radio-group v-model="dataForm.anginapectorisGrade">
                      <div>
                        <el-radio label="1"
                          >I级(一般体力活动不受限，仅在强、快或持续用力时发生心绞痛)</el-radio
                        >
                      </div>
                      <div>
                        <el-radio label="2"
                          >II级(一般体力活动轻度受限。快步、饭后、寒冷、精神刺激或醒后数小时内发生心绞痛。平地步行200m以上或登楼一层以上受限)</el-radio
                        >
                      </div>
                      <div>
                        <el-radio label="3"
                          >III级(一般体力活动明显受限。平地步行200m内或登楼一层引起心绞痛)</el-radio
                        >
                      </div>
                      <div>
                        <el-radio label="4"
                          >IV级(轻微活动或休息时即可发生心绞痛)</el-radio
                        >
                      </div>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="心脏纽约分级(NYHA)" prop="nyha">
                    <el-radio-group v-model="dataForm.nyha">
                      <div>
                        <el-radio label="1"
                          >I级(体力活动不受限，日常活动不引起过度的乏力、呼吸困难或心悸。即心功能代偿期)</el-radio
                        >
                      </div>
                      <div>
                        <el-radio label="2"
                          >II级(体力活动轻度受限。休息时无症状，日常活动即可引起乏力、心悸、呼吸困难或心绞痛，亦称I度或轻度心衰)</el-radio
                        >
                      </div>
                      <div>
                        <el-radio label="3"
                          >III级(体力活动明显受限，休息时无症状，轻于日常的活动即可引起上述症状。亦称II度或中度心衰)</el-radio
                        >
                      </div>
                      <div>
                        <el-radio label="4"
                          >IV级(不能从事任何体力活动，休息时亦有充血性心衰或心绞痛症状，任何体力活动后加里。亦称III度或重度心衰)</el-radio
                        >
                      </div>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <div class="right-title" id="section4">检查项目</div>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="心电图" prop="isHasEcg">
                    <el-radio-group v-model="dataForm.isHasEcg">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是,获得心电图文件</el-radio>
                      <el-radio label="2">是,未获得心电图文件</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="24" v-if="dataForm.isHasEcg == 1">
                  <el-form-item label="检查时间" prop="ecgCheckTime">
                    <el-date-picker
                      style="width: 200px"
                      v-model="dataForm.ecgCheckTime"
                      type="date"
                      placeholder="选择日期"
                      value-format="yyyy-MM-dd"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="24" v-if="dataForm.isHasEcg == 1">
                  <el-form-item label="心电图文件">
                    <!-- <el-upload
                      :multiple="true"
                      :file-list="fileList"
                      :show-file-list="true"
                      :on-success="handleSuccess"
                      class="editor-slide-upload"
                      action="https://httpbin.org/post"
                    >
                      <el-button size="small" type="primary"> 上传 </el-button>
                    </el-upload> -->
                    <FileUpload v-model="dataForm.ecgFileUrl" />
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="CKMB" prop="isCkmb">
                    <el-radio-group v-model="dataForm.isCkmb">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是,获得准确数值</el-radio>
                      <el-radio label="2">是,未获得准确数值</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="6" v-if="dataForm.isCkmb == 1">
                  <el-form-item label="检查时间" prop="ckmbCheckTime">
                    <el-date-picker
                      style="width: 200px"
                      v-model="dataForm.ckmbCheckTime"
                      type="date"
                      placeholder="选择日期"
                      value-format="yyyy-MM-dd"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="6" v-if="dataForm.isCkmb == 1">
                  <el-form-item label="数值" prop="ckmbValue">
                    <el-input
                      placeholder="请输入内容"
                      v-model="dataForm.ckmbValue"
                    >
                      <el-select
                        style="width: 100px"
                        v-model="dataForm.ckmbUnit"
                        slot="append"
                        placeholder="请选择"
                      >
                        <el-option label="ng/mL" value="1"></el-option>
                        <el-option label="ug/L" value="2"></el-option>
                        <el-option label="u/L" value="3"></el-option>
                        <el-option label="IU/L" value="4"></el-option>
                      </el-select>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="肌钙蛋白" prop="isTroponin">
                    <el-radio-group v-model="dataForm.isTroponin">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是,获得准确数值</el-radio>
                      <el-radio label="2">是,未获得准确数值</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="6" v-if="dataForm.isTroponin == 1">
                  <el-form-item label="检查时间" prop="troponinCheckTime">
                    <el-date-picker
                      style="width: 200px"
                      v-model="dataForm.troponinCheckTime"
                      type="date"
                      placeholder="选择日期"
                      value-format="yyyy-MM-dd"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="6" v-if="dataForm.isTroponin == 1">
                  <el-form-item label="数值" prop="troponinValue">
                    <el-input
                      placeholder="请输入"
                      v-model="dataForm.troponinValue"
                    >
                      <el-select
                        style="width: 100px"
                        v-model="dataForm.troponinUnit"
                        slot="append"
                        placeholder="请选择"
                      >
                        <el-option label="ug/L" value="1"></el-option>
                        <el-option label="ng/mL" value="2"></el-option>
                        <el-option label="mg/L" value="3"></el-option>
                        <el-option label="ng/ml" value="4"></el-option>
                        <el-option label="pg/ml" value="5"></el-option>
                      </el-select>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6" v-if="dataForm.isTroponin == 1">
                  <el-form-item label="类型" prop="troponinType">
                    <el-radio-group v-model="dataForm.troponinType">
                      <el-radio label="1">TnT</el-radio>
                      <el-radio label="2">TnI</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>

                <el-col :span="6" v-if="dataForm.isTroponin == 1">
                  <el-form-item label="状态" prop="troponinStatus">
                    <el-radio-group v-model="dataForm.troponinStatus">
                      <el-radio label="1">阳性</el-radio>
                      <el-radio label="2">阴性</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="脑钠肽" prop="isBnp">
                    <el-radio-group v-model="dataForm.isBnp">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是,获得准确数值</el-radio>
                      <el-radio label="2">是,未获得准确数值</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="6" v-if="dataForm.isBnp == 1">
                  <el-form-item label="检查时间" prop="bnpCheckTime">
                    <el-date-picker
                      style="width: 200px"
                      v-model="dataForm.bnpCheckTime"
                      type="date"
                      placeholder="选择日期"
                      value-format="yyyy-MM-dd"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="6" v-if="dataForm.isBnp == 1">
                  <el-form-item label="数值" prop="bnpValue">
                    <el-input
                      placeholder="请输入内容"
                      v-model="dataForm.bnpValue"
                    >
                      <span slot="append">pg/mL</span>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6" v-if="dataForm.isBnp == 1">
                  <el-form-item label="类型" prop="bnpType">
                    <el-radio-group v-model="dataForm.bnpType">
                      <el-radio label="1">BNP</el-radio>
                      <el-radio label="2">pro-BNP</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>

                <el-col :span="24">
                  <el-form-item label="超声心动图" prop="isUcg">
                    <el-radio-group v-model="dataForm.isUcg">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是,获得准确数值</el-radio>
                      <el-radio label="2">是,未获得准确数值</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="6" v-if="dataForm.isUcg == 1">
                  <el-form-item label="检查时间" prop="ucgCheckTime">
                    <el-date-picker
                      style="width: 200px"
                      v-model="dataForm.ucgCheckTime"
                      type="date"
                      placeholder="选择日期"
                      value-format="yyyy-MM-dd"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="6" v-if="dataForm.isUcg == 1">
                  <el-form-item label="LVEF" prop="ucgLvef">
                    <el-input
                      placeholder="请输入内容"
                      v-model="dataForm.ucgLvef"
                    >
                      <span slot="append">%</span>
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="6" v-if="dataForm.isUcg == 1">
                  <el-form-item label="室壁瘤" prop="ucgVan">
                    <el-radio-group v-model="dataForm.ucgVan">
                      <el-radio label="1">是</el-radio>
                      <el-radio label="0">否</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="6" v-if="dataForm.isUcg == 1">
                  <el-form-item label="局部室壁活动异常" prop="ucgRwm">
                    <el-radio-group v-model="dataForm.ucgRwm">
                      <el-radio label="1">是</el-radio>
                      <el-radio label="0">否</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>

                <el-col :span="24">
                  <el-form-item label="冠脉造影" prop="isCag">
                    <el-radio-group v-model="dataForm.isCag">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是,获得准确时间</el-radio>
                      <el-radio label="2">是,未获得准确时间</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="6" v-if="dataForm.isCag == 1">
                  <el-form-item label="检查时间" prop="cagCheckTime">
                    <el-date-picker
                      style="width: 200px"
                      v-model="dataForm.cagCheckTime"
                      type="date"
                      placeholder="选择日期"
                      value-format="yyyy-MM-dd"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="冠脉CTA" prop="isCoronaryCta">
                    <el-radio-group v-model="dataForm.isCoronaryCta">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是,获得准确时间</el-radio>
                      <el-radio label="2">是,未获得准确时间</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="6" v-if="dataForm.isCoronaryCta == 1">
                  <el-form-item label="检查时间" prop="coronaryCtaCheckTime">
                    <el-date-picker
                      style="width: 200px"
                      v-model="dataForm.coronaryCtaCheckTime"
                      type="date"
                      placeholder="选择日期"
                      value-format="yyyy-MM-dd"
                    >
                    </el-date-picker>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <div class="right-title" id="section5">用药情况</div>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="抗血小板药物" prop="isAntiplateletDrugs">
                    <el-radio-group v-model="dataForm.isAntiplateletDrugs">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="24" v-if="dataForm.isAntiplateletDrugs == 1">
                  <el-button
                    type="primary"
                    v-if="dataForm.antiplateletDrugsList.length != 3"
                    @click="onPushDataList('antiplateletDrugsList')"
                    size="mini"
                    plain
                    icon="el-icon-plus"
                    >添加</el-button
                  >
                </el-col>

                <el-col :span="24" v-if="dataForm.isAntiplateletDrugs == 1">
                  <el-table :data="dataForm.antiplateletDrugsList" border>
                    <el-table-column
                      label="药物名称"
                      prop="name"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          style="width: 100%"
                          v-model="scope.row.name"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in antiplateletDrugsListOptions"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="服药情况"
                      prop="status"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          style="width: 100%"
                          v-model="scope.row.status"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in statusList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="频度"
                      prop="reteCount"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          :disabled="scope.row.status != 1"
                          style="width: 50%"
                          v-model="scope.row.reteCount"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in reteCountList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                        <el-select
                          :disabled="scope.row.status != 1"
                          style="width: 50%"
                          v-model="scope.row.reteTime"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in reteTimeList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="单次剂量"
                      prop="dose"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-input
                          :disabled="scope.row.status != 1"
                          placeholder="请输入内容"
                          v-model="scope.row.dose"
                        >
                          <span slot="append">mg</span>
                        </el-input>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="停药时间"
                      prop="stopMedicationDate"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-date-picker
                          :disabled="scope.row.status != 2"
                          style="width: 100%"
                          v-model="scope.row.stopMedicationDate"
                          type="date"
                          placeholder="选择日期"
                          value-format="yyyy-MM-dd"
                        >
                        </el-date-picker>
                      </template>
                    </el-table-column>
                    <el-table-column label="操作" align="center">
                      <template slot-scope="scope">
                        <el-button
                          size="mini"
                          type="text"
                          icon="el-icon-delete"
                          @click="handleDelete(scope, 'antiplateletDrugsList')"
                          >删除</el-button
                        >
                      </template>
                    </el-table-column>
                  </el-table>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="调脂药物" prop="isLipidLoweringDrugs">
                    <el-radio-group v-model="dataForm.isLipidLoweringDrugs">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="24" v-if="dataForm.isLipidLoweringDrugs == 1">
                  <el-button
                    type="primary"
                    v-if="dataForm.lipidLoweringDrugsList.length != 3"
                    @click="onPushDataList('lipidLoweringDrugsList')"
                    size="mini"
                    plain
                    icon="el-icon-plus"
                    >添加</el-button
                  >
                </el-col>
                <el-col :span="24" v-if="dataForm.isLipidLoweringDrugs == 1">
                  <el-table :data="dataForm.lipidLoweringDrugsList" border>
                    <el-table-column
                      label="药物名称"
                      prop="roleId"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          style="width: 100%"
                          v-model="scope.row.name"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in lipidLoweringDrugsListOptions"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="服药情况"
                      prop="status"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          style="width: 100%"
                          v-model="scope.row.status"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in statusList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="频度"
                      prop="reteCount"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          :disabled="scope.row.status != 1"
                          style="width: 50%"
                          v-model="scope.row.reteCount"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in reteCountList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                        <el-select
                          :disabled="scope.row.status != 1"
                          style="width: 50%"
                          v-model="scope.row.reteTime"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in reteTimeList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="单次剂量"
                      prop="dose"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-input
                          :disabled="scope.row.status != 1"
                          placeholder="请输入内容"
                          v-model="scope.row.dose"
                        >
                          <span slot="append">mg</span>
                        </el-input>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="停药时间"
                      prop="stopMedicationDate"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-date-picker
                          :disabled="scope.row.status != 2"
                          style="width: 100%"
                          v-model="scope.row.stopMedicationDate"
                          type="date"
                          placeholder="选择日期"
                          value-format="yyyy-MM-dd"
                        >
                        </el-date-picker>
                      </template>
                    </el-table-column>
                    <el-table-column label="操作" align="center">
                      <template slot-scope="scope">
                        <el-button
                          size="mini"
                          type="text"
                          icon="el-icon-delete"
                          @click="handleDelete(scope, 'lipidLoweringDrugsList')"
                          >删除</el-button
                        >
                      </template>
                    </el-table-column>
                  </el-table>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="ACEI/ARB类" prop="isAceiAndArb">
                    <el-radio-group v-model="dataForm.isAceiAndArb">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="12" v-if="dataForm.isAceiAndArb == 0">
                  <el-form-item label="用药禁忌症" prop="isAceiAndArbCont">
                    <el-radio-group v-model="dataForm.isAceiAndArbCont">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="24" v-if="dataForm.isAceiAndArb == 1">
                  <el-button
                    type="primary"
                    v-if="dataForm.aceiAndArbList.length != 3"
                    @click="onPushDataList('aceiAndArbList')"
                    size="mini"
                    plain
                    icon="el-icon-plus"
                    >添加</el-button
                  >
                </el-col>
                <el-col :span="24" v-if="dataForm.isAceiAndArb == 1">
                  <el-table :data="dataForm.aceiAndArbList" border>
                    <el-table-column
                      label="药物名称"
                      prop="roleId"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          style="width: 100%"
                          v-model="scope.row.name"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in aceiAndArbListOptions"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="服药情况"
                      prop="status"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          style="width: 100%"
                          v-model="scope.row.status"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in statusList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="频度"
                      prop="reteCount"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          :disabled="scope.row.status != 1"
                          style="width: 50%"
                          v-model="scope.row.reteCount"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in reteCountList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                        <el-select
                          :disabled="scope.row.status != 1"
                          style="width: 50%"
                          v-model="scope.row.reteTime"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in reteTimeList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="单次剂量"
                      prop="dose"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-input
                          :disabled="scope.row.status != 1"
                          placeholder="请输入内容"
                          v-model="scope.row.dose"
                        >
                          <span slot="append">mg</span>
                        </el-input>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="停药时间"
                      prop="stopMedicationDate"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-date-picker
                          :disabled="scope.row.status != 2"
                          style="width: 100%"
                          v-model="scope.row.stopMedicationDate"
                          type="date"
                          placeholder="选择日期"
                          value-format="yyyy-MM-dd"
                        >
                        </el-date-picker>
                      </template>
                    </el-table-column>
                    <el-table-column label="操作" align="center">
                      <template slot-scope="scope">
                        <el-button
                          size="mini"
                          type="text"
                          icon="el-icon-delete"
                          @click="handleDelete(scope, 'aceiAndArbList')"
                          >删除</el-button
                        >
                      </template>
                    </el-table-column>
                  </el-table>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="ARNI" prop="isArni">
                    <el-radio-group v-model="dataForm.isArni">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="12" v-if="dataForm.isArni == 0">
                  <el-form-item label="用药禁忌症" prop="isArniCont">
                    <el-radio-group v-model="dataForm.isArniCont">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="24" v-if="dataForm.isArni == 1">
                  <el-button
                    type="primary"
                    v-if="dataForm.arniList.length != 3"
                    @click="onPushDataList('arniList')"
                    size="mini"
                    plain
                    icon="el-icon-plus"
                    >添加</el-button
                  >
                </el-col>
                <el-col :span="24" v-if="dataForm.isArni == 1">
                  <el-table :data="dataForm.arniList" border>
                    <el-table-column
                      label="药物名称"
                      prop="roleId"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          style="width: 100%"
                          v-model="scope.row.name"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in arniListOptions"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="服药情况"
                      prop="status"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          style="width: 100%"
                          v-model="scope.row.status"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in statusList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="频度"
                      prop="reteCount"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          :disabled="scope.row.status != 1"
                          style="width: 50%"
                          v-model="scope.row.reteCount"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in reteCountList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                        <el-select
                          :disabled="scope.row.status != 1"
                          style="width: 50%"
                          v-model="scope.row.reteTime"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in reteTimeList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="单次剂量"
                      prop="dose"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-input
                          :disabled="scope.row.status != 1"
                          placeholder="请输入内容"
                          v-model="scope.row.dose"
                        >
                          <span slot="append">mg</span>
                        </el-input>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="停药时间"
                      prop="stopMedicationDate"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-date-picker
                          :disabled="scope.row.status != 2"
                          style="width: 100%"
                          v-model="scope.row.stopMedicationDate"
                          type="date"
                          placeholder="选择日期"
                          value-format="yyyy-MM-dd"
                        >
                        </el-date-picker>
                      </template>
                    </el-table-column>
                    <el-table-column label="操作" align="center">
                      <template slot-scope="scope">
                        <el-button
                          size="mini"
                          type="text"
                          icon="el-icon-delete"
                          @click="handleDelete(scope, 'arniList')"
                          >删除</el-button
                        >
                      </template>
                    </el-table-column>
                  </el-table>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="β受体阻滞剂" prop="isBetaBlocker">
                    <el-radio-group v-model="dataForm.isBetaBlocker">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="12" v-if="dataForm.isBetaBlocker == 0">
                  <el-form-item label="用药禁忌症" prop="isBetaBlockerCont">
                    <el-radio-group v-model="dataForm.isBetaBlockerCont">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="24" v-if="dataForm.isBetaBlocker == 1">
                  <el-button
                    type="primary"
                    v-if="dataForm.betaBlockerList.length != 3"
                    @click="onPushDataList('betaBlockerList')"
                    size="mini"
                    plain
                    icon="el-icon-plus"
                    >添加</el-button
                  >
                </el-col>
                <el-col :span="24" v-if="dataForm.isBetaBlocker == 1">
                  <el-table :data="dataForm.betaBlockerList" border>
                    <el-table-column
                      label="药物名称"
                      prop="roleId"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          style="width: 100%"
                          v-model="scope.row.name"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in betaBlockerListOptions"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="服药情况"
                      prop="status"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          style="width: 100%"
                          v-model="scope.row.status"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in statusList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="频度"
                      prop="reteCount"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          :disabled="scope.row.status != 1"
                          style="width: 50%"
                          v-model="scope.row.reteCount"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in reteCountList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                        <el-select
                          :disabled="scope.row.status != 1"
                          style="width: 50%"
                          v-model="scope.row.reteTime"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in reteTimeList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="单次剂量"
                      prop="dose"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-input
                          :disabled="scope.row.status != 1"
                          placeholder="请输入内容"
                          v-model="scope.row.dose"
                        >
                          <span slot="append">mg</span>
                        </el-input>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="停药时间"
                      prop="stopMedicationDate"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-date-picker
                          :disabled="scope.row.status != 2"
                          style="width: 100%"
                          v-model="scope.row.stopMedicationDate"
                          type="date"
                          placeholder="选择日期"
                          value-format="yyyy-MM-dd"
                        >
                        </el-date-picker>
                      </template>
                    </el-table-column>
                    <el-table-column label="操作" align="center">
                      <template slot-scope="scope">
                        <el-button
                          size="mini"
                          type="text"
                          icon="el-icon-delete"
                          @click="handleDelete(scope, 'betaBlockerList')"
                          >删除</el-button
                        >
                      </template>
                    </el-table-column>
                  </el-table>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="降糖药物" prop="isHypoglycemicDrugs">
                    <el-radio-group v-model="dataForm.isHypoglycemicDrugs">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>

                <el-col :span="24" v-if="dataForm.isHypoglycemicDrugs == 1">
                  <el-button
                    type="primary"
                    v-if="dataForm.hypoglycemicDrugsList.length != 3"
                    @click="onPushDataList('hypoglycemicDrugsList')"
                    size="mini"
                    plain
                    icon="el-icon-plus"
                    >添加</el-button
                  >
                </el-col>
                <el-col :span="24" v-if="dataForm.isHypoglycemicDrugs == 1">
                  <el-table :data="dataForm.hypoglycemicDrugsList" border>
                    <el-table-column
                      label="药物名称"
                      prop="roleId"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          style="width: 100%"
                          v-model="scope.row.name"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in hypoglycemicDrugsListOptions"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="服药情况"
                      prop="status"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          style="width: 100%"
                          v-model="scope.row.status"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in statusList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="频度"
                      prop="reteCount"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          :disabled="scope.row.status != 1"
                          style="width: 50%"
                          v-model="scope.row.reteCount"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in reteCountList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                        <el-select
                          :disabled="scope.row.status != 1"
                          style="width: 50%"
                          v-model="scope.row.reteTime"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in reteTimeList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="单次剂量"
                      prop="dose"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-input
                          :disabled="scope.row.status != 1"
                          placeholder="请输入内容"
                          v-model="scope.row.dose"
                        >
                          <span slot="append">mg</span>
                        </el-input>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="停药时间"
                      prop="stopMedicationDate"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-date-picker
                          :disabled="scope.row.status != 2"
                          style="width: 100%"
                          v-model="scope.row.stopMedicationDate"
                          type="date"
                          placeholder="选择日期"
                          value-format="yyyy-MM-dd"
                        >
                        </el-date-picker>
                      </template>
                    </el-table-column>
                    <el-table-column label="操作" align="center">
                      <template slot-scope="scope">
                        <el-button
                          size="mini"
                          type="text"
                          icon="el-icon-delete"
                          @click="handleDelete(scope, 'hypoglycemicDrugsList')"
                          >删除</el-button
                        >
                      </template>
                    </el-table-column>
                  </el-table>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="抗凝" prop="isAnticoagulant">
                    <el-radio-group v-model="dataForm.isAnticoagulant">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="24" v-if="dataForm.isAnticoagulant == 1">
                  <el-button
                    type="primary"
                    v-if="dataForm.anticoagulantList.length != 3"
                    @click="onPushDataList('anticoagulantList')"
                    size="mini"
                    plain
                    icon="el-icon-plus"
                    >添加</el-button
                  >
                </el-col>
                <el-col :span="24" v-if="dataForm.isAnticoagulant == 1">
                  <el-table :data="dataForm.anticoagulantList" border>
                    <el-table-column
                      label="药物名称"
                      prop="roleId"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          style="width: 100%"
                          v-model="scope.row.name"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in anticoagulantListOptions"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="服药情况"
                      prop="status"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          style="width: 100%"
                          v-model="scope.row.status"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in statusList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="频度"
                      prop="reteCount"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          :disabled="scope.row.status != 1"
                          style="width: 50%"
                          v-model="scope.row.reteCount"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in reteCountList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                        <el-select
                          :disabled="scope.row.status != 1"
                          style="width: 50%"
                          v-model="scope.row.reteTime"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in reteTimeList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="单次剂量"
                      prop="dose"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-input
                          :disabled="scope.row.status != 1"
                          placeholder="请输入内容"
                          v-model="scope.row.dose"
                        >
                          <span slot="append">mg</span>
                        </el-input>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="停药时间"
                      prop="stopMedicationDate"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-date-picker
                          :disabled="scope.row.status != 2"
                          style="width: 100%"
                          v-model="scope.row.stopMedicationDate"
                          type="date"
                          placeholder="选择日期"
                          value-format="yyyy-MM-dd"
                        >
                        </el-date-picker>
                      </template>
                    </el-table-column>
                    <el-table-column label="操作" align="center">
                      <template slot-scope="scope">
                        <el-button
                          size="mini"
                          type="text"
                          icon="el-icon-delete"
                          @click="handleDelete(scope, 'anticoagulantList')"
                          >删除</el-button
                        >
                      </template>
                    </el-table-column>
                  </el-table>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="利尿剂" prop="isDiuretics">
                    <el-radio-group v-model="dataForm.isDiuretics">
                      <el-radio label="0">否</el-radio>
                      <el-radio label="1">是</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
                <el-col :span="24" v-if="dataForm.isDiuretics == 1">
                  <el-button
                    type="primary"
                    v-if="dataForm.diureticsList.length != 3"
                    @click="onPushDataList('diureticsList')"
                    size="mini"
                    plain
                    icon="el-icon-plus"
                    >添加</el-button
                  >
                </el-col>
                <el-col :span="24" v-if="dataForm.isDiuretics == 1">
                  <el-table :data="dataForm.diureticsList" border>
                    <el-table-column
                      label="药物名称"
                      prop="roleId"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          style="width: 100%"
                          v-model="scope.row.name"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in diureticsListOptions"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="服药情况"
                      prop="status"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          style="width: 100%"
                          v-model="scope.row.status"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in statusList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="频度"
                      prop="reteCount"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-select
                          :disabled="scope.row.status != 1"
                          style="width: 50%"
                          v-model="scope.row.reteCount"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in reteCountList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                        <el-select
                          :disabled="scope.row.status != 1"
                          style="width: 50%"
                          v-model="scope.row.reteTime"
                          placeholder="请选择"
                        >
                          <el-option
                            v-for="item in reteTimeList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="单次剂量"
                      prop="dose"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-input
                          :disabled="scope.row.status != 1"
                          placeholder="请输入内容"
                          v-model="scope.row.dose"
                        >
                          <span slot="append">mg</span>
                        </el-input>
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="停药时间"
                      prop="stopMedicationDate"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <el-date-picker
                          :disabled="scope.row.status != 2"
                          style="width: 100%"
                          v-model="scope.row.stopMedicationDate"
                          type="date"
                          placeholder="选择日期"
                          value-format="yyyy-MM-dd"
                        >
                        </el-date-picker>
                      </template>
                    </el-table-column>
                    <el-table-column label="操作" align="center">
                      <template slot-scope="scope">
                        <el-button
                          size="mini"
                          type="text"
                          icon="el-icon-delete"
                          @click="handleDelete(scope, 'diureticsList')"
                          >删除</el-button
                        >
                      </template>
                    </el-table-column>
                  </el-table>
                </el-col>
              </template>
            </template>
          </el-row>
        </el-form>
      </div>
    </div>
    <div class="footer">
      <el-button
        type="primary"
        v-if="getIsHide1"
        :loading="loading"
        @click="onSave"
        >保存</el-button
      >
      <el-button
        type="primary"
        v-if="getIsHide2"
        :loading="loading"
        @click="onSubmit"
        >提交</el-button
      >
      <el-button @click="goBack">返回</el-button>
    </div>
  </div>
</template>
<script>
import {
  getCpFollowUpTasks,
  getDeptList,
  getDeptUserList,
  saveCpFollowUpTask,
  showCpFollowUpSets,
  addCpFollowUpAfterYear,
  uploadCpFollowUpTask,
} from "@/api/follow-up/chest-pain";
export default {
  data() {
    return {
      dispatchId: "",
      taskDataAfterYearId: "",
      tagMonth: "",
      disabled: false,
      loading: false,
      tableData: [],
      defaultParams: {},
      statusList: [
        {
          label: "正在服用",
          value: 1,
        },
        {
          label: "已停药",
          value: 2,
        },
        {
          label: "从未服用",
          value: 3,
        },
      ],
      reteCountList: [
        {
          label: "1 次",
          value: 1,
        },
        {
          label: "2 次",
          value: 2,
        },
        {
          label: "3 次",
          value: 3,
        },
        {
          label: "4 次",
          value: 4,
        },
      ],
      reteTimeList: [
        {
          label: "每日",
          value: "1",
        },
        {
          label: "每周",
          value: "2",
        },
        {
          label: "每月",
          value: "3",
        },
      ],
      resultForm: {
        TaskDataMonth1: {},
        TaskDataMonth3: {},
        TaskDataMonth6: {},
        TaskDataMonth12: {},
      },
      dataForm: {
        followUpStatus: 1,
        way: 1,
        adverseEvents: [],
        somaticSymptoms: [],
        antiplateletDrugsList: [],
        lipidLoweringDrugsList: [],
        aceiAndArbList: [],
        arniList: [],
        betaBlockerList: [],
        hypoglycemicDrugsList: [],
        anticoagulantList: [],
        diureticsList: [],
      },
      dialogVisible: false,
      userList: [],
      deptList: [],
      antiplateletDrugsListOptions: [
        {
          label: "阿司匹林",
          value: "1",
        },
        {
          label: "氯吡格雷",
          value: "2",
        },
        {
          label: "替格瑞洛",
          value: "3",
        },
        {
          label: "吲哚布芬",
          value: "4",
        },
        {
          label: "西洛他唑",
          value: "5",
        },
        {
          label: "其它药物",
          value: "99",
        },
      ],
      lipidLoweringDrugsListOptions: [
        {
          label: "阿托伐他汀",
          value: "1",
        },
        {
          label: "瑞舒伐他汀",
          value: "2",
        },
        {
          label: "洛伐他汀",
          value: "3",
        },
        {
          label: "普伐他汀",
          value: "4",
        },
        {
          label: "辛伐他汀",
          value: "5",
        },
        {
          label: "氟伐他汀",
          value: "6",
        },
        {
          label: "匹伐他汀",
          value: "7",
        },
        {
          label: "依折麦布",
          value: "8",
        },
        {
          label: "阿利西尤单抗",
          value: "9",
        },
        {
          label: "依洛尤单抗",
          value: "10",
        },
        {
          label: "英克司兰",
          value: "11",
        },
        {
          label: "其他",
          value: "99",
        },
      ],
      aceiAndArbListOptions: [
        {
          label: "贝那普利",
          value: "1",
        },
        {
          label: "依那普利",
          value: "2",
        },
        {
          label: "赖诺普利",
          value: "3",
        },
        {
          label: "卡托普利",
          value: "4",
        },
        {
          label: "福辛普利",
          value: "5",
        },
        {
          label: "莫西普利",
          value: "6",
        },
        {
          label: "培哚普利",
          value: "7",
        },
        {
          label: "雷米普利",
          value: "8",
        },
        {
          label: "缬沙坦",
          value: "9",
        },
        {
          label: "氯沙坦",
          value: "10",
        },
        {
          label: "厄贝沙坦",
          value: "11",
        },
        {
          label: "坎地沙坦",
          value: "12",
        },
        {
          label: "替米沙坦",
          value: "13",
        },
        {
          label: "奥美沙坦",
          value: "14",
        },
        {
          label: "沙库巴曲缬沙坦钠",
          value: "15",
        },
        {
          label: "单片复方制剂",
          value: "16",
        },
        {
          label: "其他(单药)",
          value: "99",
        },
      ],
      arniListOptions: [
        {
          label: "沙库巴曲缬沙坦钠",
          value: "1",
        },
        {
          label: "其它",
          value: "99",
        },
      ],
      betaBlockerListOptions: [
        {
          label: "酒石酸美托洛尔",
          value: "1",
        },
        {
          label: "琥珀酸美托洛尔",
          value: "2",
        },
        {
          label: "比索洛尔",
          value: "3",
        },
        {
          label: "阿替洛尔",
          value: "4",
        },
        {
          label: "普萘洛尔",
          value: "5",
        },
        {
          label: "奈必洛尔",
          value: "6",
        },
        {
          label: "卡维地洛",
          value: "7",
        },
        {
          label: "其他",
          value: "99",
        },
      ],
      hypoglycemicDrugsListOptions: [
        {
          label: "磺脲类",
          value: "1",
        },
        {
          label: "双胍类",
          value: "2",
        },
        {
          label: "α糖苷酶抑制剂",
          value: "3",
        },
        {
          label: "DPP-4 抑制剂",
          value: "4",
        },
        {
          label: "GLP-1 受体激动剂",
          value: "5",
        },
        {
          label: "SGLT-2 抑制剂",
          value: "6",
        },
        {
          label: "胰岛素及胰岛素类",
          value: "7",
        },
        {
          label: "其他",
          value: "99",
        },
      ],
      anticoagulantListOptions: [
        {
          label: "华法林",
          value: "1",
        },
        {
          label: "达比加群酯",
          value: "2",
        },
        {
          label: "利伐沙班",
          value: "3",
        },
        {
          label: "阿哌沙班",
          value: "4",
        },
        {
          label: "其他",
          value: "99",
        },
      ],
      diureticsListOptions: [
        {
          label: "袢利尿剂",
          value: "1",
        },
        {
          label: "噻嗪类利尿剂",
          value: "2",
        },
        {
          label: "保钾利尿剂",
          value: "3",
        },
        {
          label: "精氨酸加压素受体拮抗剂",
          value: "4",
        },
      ],
      rules: {
        isFollowUp: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        way: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        actualEvaluationDate: {
          required: true,
          message: "必填项不能为空",
          trigger: ["change", "blur"],
        },
        followUpStatus: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        deathCause: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        cardiovascularDeath: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        cardiovascularDeathDesc: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        nonCardiovascularDeath: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        unexplainedDeath: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        currentState: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isRecoveryPlan: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isHeartCarePlan: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        adverseEvents: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        implementDate: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        bleedingSite: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isHypertension: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        hypertensionValue: {
          required: true,
          message: "必填项不能为空",
          trigger: "blur",
        },
        isHypertensionUptopar: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isHyperLipidemia: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        bloodfatCheckTime: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        bloodfatTcValue: {
          required: true,
          message: "必填项不能为空",
          trigger: "blur",
        },
        bloodfatTgValue: {
          required: true,
          message: "必填项不能为空",
          trigger: "blur",
        },
        bloodfatLdlcValue: {
          required: true,
          message: "必填项不能为空",
          trigger: "blur",
        },
        bloodfatHdlcValue: {
          required: true,
          message: "必填项不能为空",
          trigger: "blur",
        },
        isLpa: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        bloodfatLpaValue: {
          required: true,
          message: "必填项不能为空",
          trigger: "blur",
        },
        isDiabetes: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isDiabeesNormal: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        fbgCheckTime: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        fbgValue: {
          required: true,
          message: "必填项不能为空",
          trigger: "blur",
        },
        isGhb: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        ghbCheckTime: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        ghbValue: {
          required: true,
          message: "必填项不能为空",
          trigger: "blur",
        },
        isSmoke: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        smokeStatus: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isDrink: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        height: {
          required: true,
          message: "必填项不能为空",
          trigger: "blur",
        },
        weight: {
          required: true,
          message: "必填项不能为空",
          trigger: "blur",
        },
        somaticSymptoms: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        chestPainSymptom: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        somaticSymptomsDesc: {
          required: true,
          message: "必填项不能为空",
          trigger: "blur",
        },
        anginapectorisGrade: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        nyha: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isHasEcg: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        ecgCheckTime: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isCkmb: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        ckmbCheckTime: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        ckmbValue: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isTroponin: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        troponinValue: {
          required: true,
          message: "必填项不能为空",
          trigger: "blur",
        },
        troponinType: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        troponinStatus: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isBnp: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        bnpCheckTime: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        bnpValue: {
          required: true,
          message: "必填项不能为空",
          trigger: "blur",
        },
        bnpType: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isUcg: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        ucgCheckTime: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        ucgLvef: {
          required: true,
          message: "必填项不能为空",
          trigger: "blur",
        },
        ucgVan: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        ucgRwm: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isCag: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isCoronaryCta: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        coronaryCtaCheckTime: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isAntiplateletDrugs: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isLipidLoweringDrugs: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isAceiAndArb: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isAceiAndArbCont: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isArni: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isArniCont: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isBetaBlocker: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isBetaBlockerCont: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isHypoglycemicDrugs: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isAnticoagulant: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
        isDiuretics: {
          required: true,
          message: "必填项不能为空",
          trigger: "change",
        },
      },
      fileList: [],
    };
  },
  watch: {
    dataForm: {
      handler(value) {
        const weight = value.weight;
        const height = value.height / 100;
        this.dataForm.bmi =
          (weight && height && Number(weight / (height * height)).toFixed(1)) ||
          "";
      },
      deep: true,
      // immediate:true
    },
  },
  computed: {
    getIsHide1() {
      switch (this.dataForm.month) {
        case "1":
          return ![0, 4, 5].includes(this.resultForm.followStatus1);
          break;
        case "3":
          return ![0, 4, 5].includes(this.resultForm.followStatus3);
          break;
        case "6":
          return ![0, 4, 5].includes(this.resultForm.followStatus6);
          break;
        case "12":
          return ![0, 4, 5].includes(this.resultForm.followStatus12);
          break;
        case "24":
          return true;
          break;
      }
    },
    getIsHide2() {
      switch (this.dataForm.month) {
        case "1":
          return ![0, 4, 5].includes(this.resultForm.followStatus1);
          break;
        case "3":
          return ![0, 4, 5].includes(this.resultForm.followStatus3);
          break;
        case "6":
          return ![0, 4, 5].includes(this.resultForm.followStatus6);
          break;
        case "12":
          return ![0, 4, 5].includes(this.resultForm.followStatus12);
          break;
      }
    },
    getPreFillVisible() {
      return this.tagMonth != "TaskDataMonth1" && this.getIsHide1;
    },
  },
  mounted() {
    this.dispatchId = this.$route.query.dispatchId;
    this.getDeptList();
    this.getAcquiesce();
    this.getData();
  },
  methods: {
    // 获取科室列表
    async getDeptList() {
      const result = await getDeptList();
      this.deptList = result?.data?.deptList || [];
    },
    // 获取科室人员
    async getDeptUserList(departmentName) {
      const result = await getDeptUserList({ departmentName });
      this.userList = result?.data?.deptUserList || [];
    },
    // 获取详情数据
    async getData() {
      const result = await getCpFollowUpTasks({
        dispatchId: this.dispatchId,
      });
      this.resultForm = result.data;
      switch (this.resultForm.curentFollowMonth) {
        case 1:
          this.tagMonth = "TaskDataMonth1";
          break;
        case 3:
          this.tagMonth = "TaskDataMonth3";
          break;
        case 6:
          this.tagMonth = "TaskDataMonth6";
          break;
        case 12:
          this.tagMonth = "TaskDataMonth12";
          break;
        // default:
        //   this.tagMonth = "TaskDataMonth1";
        //   break;
      }
      const form = {
        adverseEvents: [],
        somaticSymptoms: [],
        antiplateletDrugsList: [],
        lipidLoweringDrugsList: [],
        aceiAndArbList: [],
        arniList: [],
        betaBlockerList: [],
        hypoglycemicDrugsList: [],
        anticoagulantList: [],
        diureticsList: [],
        ...this.defaultParams,
        ...this.resultForm[this.tagMonth],
      };
      this.setFormFieid(form);
    },
    // 获取默认值
    async getAcquiesce() {
      const result = await showCpFollowUpSets();
      const cpFollowUpSets = result?.data?.cpFollowUpSets || [];
      const defaultParams = {};
      cpFollowUpSets.map((item) => {
        defaultParams[item.itemCode] = item.value;
      });
      this.defaultParams = defaultParams;
    },
    // 心血管事件
    onAdverseEventsChange(data) {
      const index = data.findIndex((item) => item == "99");
      if (index == data.length - 1) {
        // this.$set(this.dataForm, "adverseEvents", [99]);
        this.dataForm.adverseEvents = ["99"];
      } else {
        this.dataForm.adverseEvents = data.filter((item) => item != "99");
      }
    },
    setFormFieid(result) {
      const adverseEvents =
        (result.adverseEvents &&
          result.adverseEvents.length &&
          result.adverseEvents.split("|")) ||
        [];
      const somaticSymptoms =
        (result.adverseEvents &&
          result.somaticSymptoms.length &&
          result.somaticSymptoms.split("|")) ||
        [];
      this.dataForm = {
        adverseEvents: [],
        somaticSymptoms: [],
        antiplateletDrugsList: [],
        lipidLoweringDrugsList: [],
        aceiAndArbList: [],
        arniList: [],
        betaBlockerList: [],
        hypoglycemicDrugsList: [],
        anticoagulantList: [],
        diureticsList: [],
        ...result,
        adverseEvents,
        somaticSymptoms,
      };
      this.userList = [];
      if (this.dataForm.followUpDept) {
        this.getDeptUserList(this.dataForm.followUpDept);
      }
    },
    // 随访月份切换
    onTagClick(labelName, field) {
      // if ([0, 4, 5].includes(this.resultForm[field])) return;
      this.tagMonth = labelName;
      const result = {
        ...this.defaultParams,
        ...this.resultForm[labelName],
      };
      this.taskDataAfterYearId = "";
      this.setFormFieid(result);
    },
    onTagaAfterYearClick(item) {
      const result = {
        ...this.defaultParams,
        ...item,
      };
      this.tagMonth = '';
      this.taskDataAfterYearId = item.id;
      this.setFormFieid(result);
    },
    goBack() {
      this.$router.push("/follow-up-list/chest-pain");
      // this.$router.back()
    },
    base64ToFile(urlData, name) {
      let arr = urlData.split(",");
      let mime = arr[0].match(/:(.*?);/)[1];
      let bytes = atob(arr[1]); // 解码base64
      let n = bytes.length;
      let ia = new Uint8Array(n);
      while (n--) {
        ia[n] = bytes.charCodeAt(n);
      }
      return new File([ia], name, { type: mime });
    },

    onChangeDept(id) {
      // this.dataForm.userId = "";
      this.$set(this.dataForm, "userId", "");
      const departmentName =
        this.deptList.find((item) => item.id == id).name || "";
      this.getDeptUserList(departmentName);
    },
    handleSuccess(response, file) {
      // const blob = new Blob([atob(response.files.file)], {
      //   type: "image/jpeg",
      // });
      // const url = URL.createObjectURL(blob);
      this.dataForm.ecgFileUrl = response.files.file;
      console.log(response.files.file);
    },
    async onSave() {
      this.loading = true;
      // 心血管
      const adverseEvents = this.dataForm.adverseEvents.join("|");
      // 躯体症状
      const somaticSymptoms = this.dataForm.somaticSymptoms.join("|");
      const dataForm = {
        ...this.dataForm,
        status: 0,
        adverseEvents,
        somaticSymptoms,
        dispatchId: this.dispatchId,
        followUpDept:
          this.deptList.find((item) => item.id == this.dataForm.depId)?.name ||
          "",
        followUpDoctor:
          this.userList.find((item) => item.id == this.dataForm.userId)?.name ||
          "",
      };
      const result = await saveCpFollowUpTask(dataForm);
      if (result.code == 0) {
        this.$message({
          type: "success",
          message: "保存成功",
        });
      } else {
        this.$message({
          type: "error",
          message: result.message,
        });
      }
      this.loading = false;
      this.getData();
    },
    // 提交
    onSubmit() {
      this.$refs.dataForm.validate(async (valid) => {
        if (valid) {
          this.loading = true;
          // 心血管
          const adverseEvents = this.dataForm.adverseEvents.join("|");
          // 躯体症状
          const somaticSymptoms = this.dataForm.somaticSymptoms.join("|");
          const dataForm = {
            ...this.dataForm,
            adverseEvents,
            somaticSymptoms,
            dispatchId: this.dispatchId,
            followUpDept:
              this.deptList.find((item) => item.id == this.dataForm.depId)
                ?.name || "",
            followUpDoctor:
              this.userList.find((item) => item.id == this.dataForm.userId)
                ?.name || "",
          };
          const result = await uploadCpFollowUpTask(dataForm);
          if (result.code == 0) {
            this.$message({
              type: "success",
              message: "提交成功",
            });
          } else {
            this.$message({
              type: "error",
              message: result.message,
            });
          }
          this.loading = false;
          this.getData();
        } else {
          return this.$message({
            type: "warning",
            message: "您还有必填项未填写！",
          });
        }
      });
    },
    onBatchAssignment() {
      this.dialogVisible = true;
    },
    handleClose() {
      this.dialogVisible = false;
    },
    goAnchor(selector) {
      document.querySelector(selector).scrollIntoView({
        behavior: "smooth",
      });
    },
    onPrefill() {
      this.$confirm("请确认是否进行预填写，将覆盖当前数据, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        let result = {};
        if (this.tagMonth == "TaskDataMonth3") {
          result = this.resultForm.TaskDataMonth1;
        } else if (this.tagMonth == "TaskDataMonth6") {
          result = this.resultForm.TaskDataMonth3;
        } else if (this.tagMonth == "TaskDataMonth12") {
          result = this.resultForm.TaskDataMonth6;
        }
        const adverseEvents =
          (result.adverseEvents && result.adverseEvents.split("|")) || [];
        const somaticSymptoms =
          (result.somaticSymptoms && result.somaticSymptoms.split("|")) || [];
        this.dataForm = {
          ...result,
          adverseEvents,
          somaticSymptoms,
        };
        this.$message({
          type: "success",
          message: "填写成功!",
        });
      });
    },
    // 抗血小板药物添加
    onPushDataList(labelName) {
      this.dataForm[labelName].push({
        name: "",
        status: "",
      });
    },
    // 删除数据
    handleDelete(scope, labelName) {
      this.dataForm[labelName].splice(scope.$index, 1);
    },
  },
};
</script>

<style scoped lang='scss'>
::v-deep .el-form-item__label {
  // background: #F1F3F8 !important;
}
.isClick {
  cursor: not-allowed !important;
}
.follow-up-details {
  padding: 20px;
  background: #fff;
  .title {
    text-align: center;
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 700;
  }
  .descriptions {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    background-color: rgb(67, 128, 235);
    height: 60px;
    font-size: 16px;
    padding-left: 15px;
    color: #fff;
    .descriptions-item {
      display: flex;
      align-items: center;
      margin-right: 20px;
      .item-label {
        font-weight: 700;
        margin-right: 20px;
      }
    }
  }
  .action {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .tag {
      span {
        margin-right: 20px;
        cursor: pointer;
      }
    }
  }

  .content {
    display: flex;
    height: calc(100vh - 320px);
    .left {
      flex: 0 0 160px;
      .left-card {
        background: #f2f2f2;
        margin-bottom: 20px;
        padding: 10px;
        cursor: pointer;
        text-align: center;
        border-radius: 4px;
      }
      .left-card:active {
        font-weight: 700;
        background: #13c2c2;
        color: #fff;
      }
    }
    .right {
      flex: 1;
      margin-left: 20px;
      padding-right: 20px;
      overflow-y: scroll;
      .right-title {
        font-weight: 700;
        margin-bottom: 20px;
      }
    }
  }
  .footer {
    margin-top: 40px;
    display: flex;
    justify-content: center;
  }
}
</style>
